import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
    plugins: [
        vue(),
    ],
    resolve: {
        alias: {
            '@': fileURLToPath(new URL('./src', import.meta.url)),
        }
    },
    server: {
        https: false, //开启https配置
        port: 3030, // 端口号
        host: "0.0.0.0",
        open: true //配置自动启动浏览器
    },
    css: {
        preprocessorOptions: {
            scss: {
                api: 'modern-compiler',
                additionalData: `@use "@/assets/scss/_mixin.scss" as *;`
            }
        }
    }
})
